﻿//-----------------------------------------------------------------------
// <copyright file="IStateRestorable.cs" author="Artak Mkrtchyan">
//     Creative Commons - GNU General Public License (http://creativecommons.org/licenses/GPL/2.0/
// </copyright>
// <author>Artak Mkrtchyan</author>
// <email>mkArtak@gmail.com</email>
// <date>11/08/2012</date>
//-----------------------------------------------------------------------

namespace ConsoleHoster.Common.ViewModel
{
	/// <summary>
	/// Represents a contract for classes, which want to be able to preserve and restore states
	/// </summary>
	public interface IStateRestorable
	{
		/// <summary>
		/// Saves the current state of the object to come back to it later
		/// </summary>
		void SaveState();

		/// <summary>
		/// Restores the state of the object to the last saved one
		/// </summary>
		/// <exception cref="System.ApplicationException">
		/// Throws, when there is no saved state for the object to restore to
		/// </exception>
		void RestoreState();
	}
}
